package com.woniuxy.mapper.custom;

import com.woniuxy.entity.User;
import com.woniuxy.mapper.UserMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Repository
public interface CustomUserMapper extends UserMapper {
    List<Integer> findRoleIdsByUserId(Integer userId);

    int distRoleToUser(@Param("userId") Integer userId, List<Integer> roleIds);

    int revokeRoleFromUser(Integer userId);
    List<User> findByLike(String like);

    int updatePassword(Integer userId,String newUpwd);

    User findByPass(String oldPass,Integer userId);
}